<?
require_once("conn.php");
?>
<table>
	<tr>
		<td align="center"><a href="#" onclick="loadCatManage()">Category Manage</a></td>
		<td align="center"> | <a href="#" onclick="loadProManage()">Product Manage</a></td>
		<td align="center"> | <a href="#" onclick="loadUnitManage()">Unit Manage</a></td>
	</tr>
</table><br>
<a href="#" onclick="frmAddCategory()">Add New</a><br><br>
<table class="table_" width="300">
	<tr>
		<td align="center" width="40">ID</td>
		<td>Category Name</td>
		<td>&nbsp;</td>
	</tr>
	<?
		$sql = "SELECT * FROM pch_category";
		$query = mysql_query($sql);
		while($row = mysql_fetch_array($query)){
		?>
			<tr>
				<td align="center"><?=$row["id"]?></td>
				<td><?=$row["category_name"]?></td>
				<td>
					<?
						if(checkAccess("3")){
					?>
						<a href="#" onclick="frmEditCategory('<?=$row["id"]?>');">Edit</a>
					<?
						}
					?>
				</td>
			</tr>
		<?
		}

	?>
</table>